<?php
namespace Admin\Controller;
use Think\Controller;
class EmailController extends BaseController {
	function index(){
			//******************** 配置信息 ********************************
		
		$smtpserver = "mail.xiakenet.com";//SMTP服务器
		$smtpserverport =25;//SMTP服务器端口
		$smtpusermail = "123@xiakenet.com";//SMTP服务器的用户邮箱
		$smtpemailto = $_POST['toemail'];//发送给谁
		$smtpuser = "123@xiakenet.com";//SMTP服务器的用户帐号
		$smtppass = "123456";//SMTP服务器的用户密码
		$mailtitle = $_POST['tittle'];//邮件主题
		$mailcontent = "<h1>".$_POST['content']."</h1>";//邮件内容
		$mailtype = "HTML";//邮件格式（HTML/TXT）,TXT为文本邮件

		$email = new \Think\Email();
		$email->debug = false;//是否显示发送的调试信息
	    $aa=$email->sendmail($smtpemailto, $smtpusermail, $mailtitle, $mailcontent, $mailtype);
	    die(json_encode($aa)); exit();
		$this->display();
	}
}              